const sum = require('./sum');
const {average,maxV} = require('./arr-utils');
// const uniq = require('uniq')

// console.log(sum);

let arr = [60,70,80,90,70];

// console.log(sum(arr));

console.log(average(arr))

// console.log(maxV(arr));

// console.log(uniq(arr)); //[ 60, 70, 80, 90 ]


// 获取按钮 document is not defined
let btn = document.querySelector('button');
let box = document.querySelector('.box');

btn.onclick = function(){
    // console.log("执行了");

    box.innerHTML = "平均数："+average(arr);
}